"""web URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from . views import user,cates,goods,index

urlpatterns = [
    url(r'^$',index.index,name="myadmin_index"),
    #用户管理
    url(r'^user/index/$', user.userIndex,name="user_index"),
    url(r'^user/add/$', user.userAdd,name="user_add"),
    url(r'^user/add/post/$', user.userAddPost,name="user_add_post"),
    url(r'^user/edit/$', user.userEdit,name="user_edit"),
    url(r'^user/edit/post/$', user.userEditPost,name="user_edit_post"),
    url(r'^user/setstatus/$',user.userSetStatus,name="user_set_status"),
    url(r'^user/setmanystatus/$',user.userSetManyStatus,name="user_set_manystatus"),
    url(r'^user/del/$', user.userDel,name="user_del"),
    #分类管理
    url(r'^cates/index/$', cates.catesIndex,name="cates_index"),
    url(r'^cates/add/$', cates.catesAdd,name="cates_add"),
    url(r'^cates/edit/$', cates.catesEdit,name="cates_edit"),
    url(r'^cates/name/edit/$', cates.catesNameEdit, name="cates_name_edit"),
    url(r'^cates/del/$', cates.catesDel,name="cates_del"),
    #商品管理
    url(r'^goods/add/$', goods.goods_add, name="goods_add"),
    url(r'^goods/insert/$', goods.goods_insert, name="goods_insert"),
    url(r'^goods/index/$', goods.goods_index, name="goods_index"),
    url(r'^goods/edit/$', goods.goodsEdit,name="goods_edit"),
    url(r'^goods/del/$', goods.goodsDel, name="goods_del"),
    url(r'^goods/setstatus/$',goods.goodsSetStatus,name="goods_set_status"),
    url(r'^goods/setmanystatus/$',goods.goodsetManyStatus,name="goods_set_manystatus"),
    #用户登录
    url(r'^login/$',index.myadmin_login,name="user_login"),
    url(r'^logout/$', index.myadmin_logout, name="user_logout"),
    url(r'^verifycode/$', index.verifycode, name="verifycode"),
]
